package com.ccdc.lbcmsystem.mapper;

import com.ccdc.lbcmsystem.pojo.Children;
import com.ccdc.lbcmsystem.pojo.Veteran;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
@Component
public interface VeteranMapper {

    //查询所有用户
    List<Veteran> queryVeteranList();
    //通过姓名来进行查询
    List<Veteran> queryListVeteranByName(@RequestParam("name") String name);
    //新增退伍军人
    int addVeteran(@RequestParam("veteran") Veteran veteran);
    //根据ID查询退伍军人信息
    Veteran queryVeteranById(@RequestParam("id") Integer id);
    //根据ID删除退伍军人信息
    int delVeteranById(@RequestParam("id") Integer id,@RequestParam("deleteStatus") Integer deleteStatus);
    //根据ID修改信息
    int updateVeteranById(@RequestParam("id") Integer id,@RequestParam("name") String name,
                           @RequestParam("phone") String phone,@RequestParam("birthday") String birthday,
                           @RequestParam("age") Integer age,@RequestParam("army") String army,
                           @RequestParam("address") String address,@RequestParam("healthCondition") String healthCondition,
                           @RequestParam("health") Integer health,@RequestParam("familyStatus") Integer familyStatus);
}
